package com.example.demo2.util;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author
 * @version 1.0
 * @description TODO
 * @date 2024/7/7 14:28
 */
public class JobProgress {
    private AtomicInteger completedItems = new AtomicInteger(0);
    private AtomicInteger progress = new AtomicInteger(0);

    public void incrementCompletedItems() {
        completedItems.incrementAndGet();
    }

    public int getCompletedItems() {
        return completedItems.get();
    }

    public void setProgress(int value) {
        progress.set(value);
    }

    public int getProgress() {
        return progress.get();
    }
}